//=========================================================
// Subject class
//
// It defines the interface to attach with an object of
// the type Observer.
//
// It can attach any number of the Observer type object.
// It contains functions Attach() and Detach() to attach and
// detach the Observer type object.
//
// The function Notify() calls function Update() located within
// each of its attached Observer type objects. This function
// is used whenever there is a state change and is
// required to notify all of its Observer type objects.
//
//=========================================================
#ifndef __CPPTUTORSUBJECT_H__
#define __CPPTUTORSUBJECT_H__

#include "cppTutorObserver.h"

class Subject 
{
    public:
        Subject();
       ~Subject();

        void Attach(Observer*);
        void Detach(Observer*);
        void Notify();
    
    private:
         vector<Observer*> _observers;
};

#endif //__CPPTUTORSUBJECT_H__
